import request from '@/utils/request'

// 查询区域管理员列表
export function listRegion(query) {
  return request({
    url: '/system/region/list',
    method: 'get',
    params: query
  })
}
// 地址
export function listChina(query) {
  return request({
    url: '/system/china/listAll',
    method: 'get',
    params: query
  })
}
// 查询区域管理员详细
export function getRegion(id) {
  return request({
    url: '/system/region/' + id,
    method: 'get'
  })
}

// 新增区域管理员
export function addRegion(data) {
  return request({
    url: '/system/region',
    method: 'post',
    data: data
  })
}

// 修改区域管理员
export function updateRegion(data) {
  return request({
    url: '/system/region',
    method: 'put',
    data: data
  })
}

// 删除区域管理员
export function delRegion(id) {
  return request({
    url: '/system/region/' + id,
    method: 'delete'
  })
}

//新增大区管理员
export function addBigRegion(data) {
  return request({
    url: '/system/bigRegion',
    method: 'post',
    data: data
  })
}
//编辑大区
export function updateBigRegion(data) {
  return request({
    url: '/system/bigRegion',
    method: 'put',
    data: data
  })
}
//查看大区详情
export function getBigRegion(id) {
  return request({
    url: '/system/bigRegion/' + id,
    method: 'get'
  })
}
//大区列表
export function bigRegionList(query) {
  return request({
    url: '/system/bigRegion/bigList',
    method: 'get',
    params: query
  })
}
// 删除大区管理员
export function delBigRegion(id) {
  return request({
    url: '/system/bigRegion/' + id,
    method: 'delete'
  })
}

//部门列表
export function departmentList(query) {
  return request({
    url: '/system/bigRegion/departmentList',
    method: 'get',
    params: query
  })
}
//新增部门管理员
export function addDepartment(data) {
  return request({
    url: '/system/department',
    method: 'post',
    data: data
  })
}
//大区下拉框
export function listBigRegion(query) {
  return request({
    url: '/system/bigRegion/bigRegion',
    method: 'get',
    params: query
  })
}